package com.vikutorika.vo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVo {
        String code;
        String message;
        Object data;


        public static ResultVo success() {
                return new ResultVo("200","业务处理成功",null);
        }
        public static ResultVo success(String message) {
                return new ResultVo("200",message,null);
        }
        public static ResultVo success(Object object) {
                return new ResultVo("200","业务处理成功",object);
        }
        public static ResultVo success(String message,Object object) {
                return new ResultVo("200",message,object);
        }
        public static ResultVo error() {
                return new ResultVo("500", "系统繁忙，稍后重试", null);
        }
        public static ResultVo error(String message) {
                return new ResultVo("500", message, null);
        }
}
